﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZSZ.DTO;
using ZSZ.Model;

namespace ZSZ.IService
{
    public partial interface IHouseService : IBaseService<House>
    {
        HouseDTO[] GetPagedData(long cityId,long typeId, out long total, int pageIndex, int pageSize);

        HouseDTO GetDTOById(long id);

        HouseDTO[] GetHouses();
        HouseDTO[] GetHouses(long cityId, long typeId);
        HouseDTO[] GetHousesByCityId(long cityId,int count);
        HouseDTO[] GetHousesByCommunityId(long communityId, int count);

        /// <summary>
        /// 得到cityId这个城市今天的新增房源的数量
        /// </summary>
        /// <param name="cityId"></param>
        /// <returns></returns>
        int GetTodayNewHouseCount(long cityId);

        HouseSearchResult Search(HouseSearchOptions options);

        long Add(HouseDTO dto);
        void Update(HouseDTO dto);
    }
}
